'use strict';
import React from 'react';
import { View, Text, Navigator,StyleSheet } from 'react-native';
import {WhiteSpace, Button } from 'antd-mobile';
export default class MainScreen extends React.Component {
    static navigationOptions = {
        title: 'Welcome'
    };
    render() {
        const { navigate } = this.props.navigation;
        return (
            <View style={styles.container}>
                <Text style={styles.titleText}>
                    this is my first react-native!
                </Text>
                <Text style={styles.titleText}>
                    Please click the button to jump
                </Text>
                <WhiteSpace size="xs" />
                <Button
                    onClick={() =>navigate('Search', { user: 'Search' })
                    }
                >jump to Search</Button>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#fff',
        alignItems: 'center',
        justifyContent: 'center',
    },
    titleText: {
        fontSize: 20,
        fontWeight: 'bold',
    },
});